import { reactive, onMounted, defineComponent } from 'vue'
import Qs from 'qs'
import { add, getById } from './${t.varName}.api.js'//引入API
import style from "./${t.varName}.module.css";//CSS

// 组件（生命周期钩子都写在这个组件中）
const Expose = defineComponent({
    setup() {
        return () =>
<Container/>
    }
})

// 容器
const Container = () => {
    return (
        <>
            <div className={style.vueBox} style="'display: block;'">
                <div className={style.cPanel}>
                    <Form></Form>
                </div>
            </div>
        </>
    );
};

// 表单
const form = reactive({
<#list t.tallList as c>
    ${c.fieldName}:'',
</#list>
})
const Form = () => {
    return (
        <>
            <el-form label-width="120px" inline={true}>
				<#list t.tallList as c>
                <el-form-item label="${c.columnComment3}">
                    <el-input v-model={form.${c.fieldName}}/>
                </el-form-item>
                </#list>
                <el-form-item>
                    <el-button type="primary" onClick="onSubmit">Create</el-button>
                    <el-button>Cancel</el-button>
                </el-form-item>
            </el-form>
        </>
    )
}


export default Expose;
